import {searchGoodsRequest} from '@/api/index'
const state = {
    searchGoodsList : []
}
const mutations = {
    SET_GOODSLIST(state,value){
        state.searchGoodsList = value
    }
}
const actions = {
    async getGoodsList({commit},searchParams){
        const result = await searchGoodsRequest(searchParams)
        // console.log(result);
        commit('SET_GOODSLIST',result)
    }
}
const getters ={
    trademarkList(state){
        return state.searchGoodsList.trademarkList
    },
    attrsList(state){
        return state.searchGoodsList.attrsList
    },
    goodsList(state){
        return state.searchGoodsList.goodsList
    },
}

export default {
    namespaced:true,
    state,
    mutations,
    actions,
    getters
}